
<%@ page import="duylinh.VatLieu" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'vatLieu.label', default: 'VatLieu')}" />
		<title><g:message code="vatLieu.danhsach.label"/></title>
	</head>
	<body>
		<a href="#list-vatLieu" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li>
                    <g:link class="create" action="createEditVatLieu">
                        <g:message code="default.new.vatlieu.label" args="[entityName]" />
                    </g:link>
                </li>
			</ul>
		</div>
		<div id="list-vatLieu" class="content scaffold-list" role="main">

			<div class="marginTopLarge marginLeftLarge quoteBig marginBottomLarge">
                <g:message code="default.list.label.vatLieu"  />
            </div>

			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<table>
				<thead>
					<tr>

                        <g:sortableColumn property="ten" title="${message(code: 'vatLieu.ten.label', default: 'Ten')}" />

						<g:sortableColumn property="chatLieu" title="${message(code: 'vatLieu.chatLieu.label', default: 'Chat Lieu')}" />
					
						<g:sortableColumn property="chieuDai" title="${message(code: 'vatLieu.chieuDai.label', default: 'Chieu Dai')}" />
					
						<g:sortableColumn property="chieuRong" title="${message(code: 'vatLieu.chieuRong.label', default: 'Chieu Rong')}" />

                        <g:sortableColumn property="doDay" title="${message(code: 'vatLieu.doDay.label', default: 'doDay')}" />

                        <g:sortableColumn property="dangCuon" title="${message(code: 'vatLieu.dangCuon.label', default: 'Dang Cuon')}" />

                        <th><g:message code="vatLieu.nhaCungUng.label" default="Nha Cung Ung" /></th>

                        <th>
                            <g:message code="sanPham.thaoTac.label"></g:message>
                        </th>
                    </tr>
				</thead>
				<tbody>
				<g:each in="${vatLieuInstanceList}" status="i" var="vatLieuInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
                        <td>
                            <g:link action="show" id="${vatLieuInstance.id}">
                                ${fieldValue(bean: vatLieuInstance, field: "ten")}
                            </g:link>
                        </td>


						<td>${fieldValue(bean: vatLieuInstance, field: "chatLieu")}</td>
					
						<td>${fieldValue(bean: vatLieuInstance, field: "chieuDai")}</td>
					
						<td>${fieldValue(bean: vatLieuInstance, field: "chieuRong")}</td>

                        <td>${fieldValue(bean: vatLieuInstance, field: "doDay")}</td>


                        <td><g:formatBoolean boolean="${vatLieuInstance.dangCuon}" /></td>

                        <td>
                            <g:link controller="nhaCungUng" action="show" id="${ vatLieuInstance?.nhaCungUng?.id}">
                                ${vatLieuInstance?.nhaCungUng?.ten}
                            </g:link>
                        </td>

                         <td>
                            <g:link action="createEditVatLieu" params="['vatLieuId':vatLieuInstance?.id]">
                                <g:message code="default.button.edit.label"></g:message>
                            </g:link>
                         </td>
                    </tr>
				</g:each>
				</tbody>
			</table>
			<div class="pagination">
				<g:paginate total="${vatLieuInstanceTotal}" />
			</div>
		</div>
	</body>
</html>
